<template>
  <div class="all-box">
    <div class="header">
      <h3>个人中心</h3>
      <div class="avatar">
        <img :src=" state.head_img" alt="">
      </div>
      <span>{{ state.nickname }}</span>
      <p>累计打卡小习惯100天</p>
    </div>

    <div class="content">
      <p class="content_p">主要功能</p>
      <div class="content-box">
        <div class="content-box_s">
          <i class="iconfont icon-shangdian icons"></i>
          <p>商店</p>
        </div>
        <div class="content-box_s">
          <i class="iconfont icon-yinlejiaojuanji icons"></i>
          <p>音乐</p>
        </div>
        <div class="content-box_s">
          <i class="iconfont icon-naozhong icons"></i>
          <p>习惯提醒</p>
        </div>
        <div class="content-box_s">
          <i class="iconfont icon-mubiao icons"></i>
          <p>我的flay</p>
        </div>
      </div>
    </div>
  
  </div>
</template>

<script setup>
import { reactive } from 'vue';

const state = reactive({
  head_img: sessionStorage.getItem('headimg'),
  nickname: sessionStorage.getItem('nickname')
})

</script>

<style lang="less" scoped>
.all-box{
  height: 100vh;
  margin: 0px 15px;
  .header{
    height: 200px;
    h3{
      margin-bottom: 20px;
      font-size: 16px;
      text-align: center;
      line-height: 46px;
      font-weight: bold;
    }
    .avatar{ 
      width: 75px;
      height: 75px;
      border-radius: 50%;
      overflow: hidden;
      border: solid 1px #757575;
      margin: 0 auto;
      img{
        width: 100%;
      }
    }
    span{
      font-size: 15px;
      display: block;
      text-align: center;
      margin: 10px 0 ;
    }
    p{
      text-align: center;
      font-size: 12px;
      color: #757575;
    }
  }
  .content{
    .content_p{
      margin: 15px 0px;
      font-size: 16px;
      color: #757575;
    }
    .content-box{
      width: 100%;
      font-size: 14px;
      color: #757575;
      display: flex;
      flex-wrap:wrap;
      
      .content-box_s{
        flex: 1;
        height: 76px;
        background-color: #f6f6f2;
        margin: 10px;
        padding: 10px 10px;
        border-radius: 10px;
        text-align: center;
        .icons{
          font-size: 36px;
        }
        p{
          margin-top: 5px;
        }
      }
    }

  }
}
</style>